package com.itheima.service;

import com.itheima.domain.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

// Product product=restTemplate.getForObject("http://service-product/product/"+pid,Product.class);
@FeignClient(value = "service-product") //指定调用哪个微服务
public interface ProductService {
    @RequestMapping("/product/{pid}")
    Product findByPid(@PathVariable(value = "pid") Integer pid);
}
